<!doctype html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml" xmlns:v-demo="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

<div id="app" v-demo:foo.a.b="message">

</div>


</body>
<script src="../../vender/vue@2.4.2.js"></script>

<script>
    Vue.directive('demo',{
       bind: function (el, binding, vnode,oldVnode) {
           console.dir(arguments);
           var s=JSON.stringify;
           el.innerHTML=`
               name:${s(binding.name)}<br>
               value:${s(binding.value)}<br>
               expression:${s(binding.expression)}<br>
               argument:${s(binding.arg)}<br>
               modifiers:${s(binding.modifiers)}<br>
               vnode keys:${Object.keys(vnode).join(', ')}<br>
               oldVnode:${s(oldVnode)}<br>
           `;
       }
    });

    var app=new Vue({
        el:'#app',
        data:{
            message:'Hello'
        }
    });

</script>
</html>